package com.itszt.manager.api;

import com.itszt.common.VO.ChannerOb;
import com.itszt.manager.service.ContentService;
import com.itszt.pojo.TbContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BigAdProviderController {

    @Autowired
    private ContentService contentService;

    @GetMapping("showBigAds")
    public ChannerOb showBigAds() {
        System.out.println("contentService = " + contentService);
        ChannerOb channerOb = new ChannerOb();
        List<TbContent> tbContents = contentService.showBigAD();
        channerOb.setData(tbContents);
        channerOb.setStatus("200");
        return channerOb;
    }
}
